﻿using System;
using System.Security;
namespace LeRenard.Core.Cryptography
{
    /// <summary>
    /// Contract for a cryptographer.
    /// </summary>
    /// <typeparam name="TDecrypted">Input type of the data, or "decrypted".</typeparam>
    /// <typeparam name="TEncrypted">Output type of the data, or "encrypted".</typeparam>
    public interface ICryptographer<TDecrypted, TEncrypted> : IDisposable
    {
        /// <summary>
        /// Encode the specified input.
        /// </summary>
        /// <param name="input">Input data to be encoded.</param>
        TEncrypted Encode(TDecrypted input);

        /// <summary>
        /// Decode the specified input.
        /// </summary>
        /// <param name="input">Input data to be decoded.</param>
        TDecrypted Decode(TEncrypted input);
    }
}
